<?php

namespace App\Jobs;

use App\Http\Services\SmsService;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;

class ConsultNotify implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;


    public $firm;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct($firm)
    {
        //
        $this->firm = $firm;
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        //
        SmsService::send('SMS_474085144',$this->firm->phone,
            ['time' => date('Y-m-d H:i:s',$this->firm->consult_time)]);

    }
}
